﻿namespace DYH.Extensions.DependencyInjection;

public abstract class DependencyInjectionAttribute(Type? interfaceType = null)
    : Attribute
{
    public Type? InterfaceType { get; } = interfaceType;
}

[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
public class SingletonDIAttribute(Type? interfaceType = null)
    : DependencyInjectionAttribute(interfaceType);

[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
public class TransientDIAttribute(Type? interfaceType = null)
    : DependencyInjectionAttribute(interfaceType);

[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
public class ScopedDIAttribute(Type? interfaceType = null)
    : DependencyInjectionAttribute(interfaceType);